/* 
 * File:   Document.cpp
 * Author: taylor
 * 
 * Created on November 7, 2012, 2:25 PM
 */
#include "Document.h"

/**
 * Document constructor
 * @param id the ID of the document
 * @param title the name/title of the document
 */
Document::Document(int id, string title){
    _title = title;
    _id = id;
}

/**
 * Get the name of the document
 * @return the document name as a string
 */
string Document::getTitle() {
    return _title;
}

/**
 * Get the vector of terms stored in this document
 * @return 
 */
vector<string> Document::getTerms() {
    return _info;
}

/**
 * Set the name of the document
 * @param str the name of the document
 */
void Document::setTitle(string str) {
    _title = str;
}

/**
 * Get the ID of the document
 * @return 
 */
int Document::getID(){
    return _id;
}

/**
 * Set terms for a document
 * @param terms a vector of terms to set as the document's terms
 */
void Document::setTerms(vector<string> terms) {
    for(int i = 0; i < terms.size(); i++) {
        _info.push_back(terms.at(i));
    }
}
